<?php
/*  
  Copyright (c) 2010-02 SongCMS 
  SongCMS All Rights Reserved. 
  Support:www.SongCMS.com
  QQ:544255858   19951025
  Author:Song  Version:3.17
  Date:2010-08-12 09:28:32
*/
$product = new product();
$product -> Lang = $Lang;
$product -> Ltext = $Html['page'];
$SC -> register -> templateObject("product",$product);
$news = new news();
$news -> Lang = $Lang;
$news -> Ltext = $Html['page'];
$SC -> register -> templateObject("news",$news);
$article = new article();
$article -> Lang = $Lang;
$article -> Ltext = $Html['page'];
$SC -> register -> templateObject("article",$article);
$SC -> register -> templateObject("sdb",$sdb);
$download = new download();
$download -> Lang = $Lang;
$download -> Ltext = $Html['page'];
if(isset($sGET['i'])){
	$DownloadFileURL = $download -> DownloadViews($sGET['i']);
	ob_end_clean();
	header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
	header('Content-Description: File Transfer');
	header('Content-Type: application/octet-stream');
	@header('Content-Length: ' . filesize($DownloadFileURL));
	header('Content-Disposition: attachment; filename=' . basename($DownloadFileURL));
	@readfile($DownloadFileURL);
	exit();
}
$db = new db();
if(empty($sGET['c'])){ 
	$do['cName'] = $do['RootName'] = $do['Sort'] = $Html['AllResources']; 
}else{
	$do['Sort'] = ArticleName(trim($sGET['c']),' >> ',1);
	$cCname = explode('|',$sGET['c']);
	$do['cName'] = ArticleName($cCname[count($cCname)-1]);
	$do['RootName'] = ArticleName($cCname[0]);
}
if(!empty($sGET['w'])){
	$download -> isSelect = trim($sGET['w']);
	$Html['swd'] = $sGET['w'];
	$SC -> assign("Html",$Html);
	$do['cName'] = $do['RootName'] = $do['Sort'] = $Html['SearchDownload']; 
}
$SC -> register -> templateObject("download",$download);
$SC -> assign('do',$do);
unset($do);
include_once($CodeList . 'top.php');
include_once($CodeList . 'bottom.php');
$SC -> display($TemFile,$GetUrlPar);
?>